home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / jaz_clib.arc / JZCLSWND.C < prev    next >
Text File  |  1989-04-09  |  826b  |  29 lines

  1. /*
  2. ┌────────────────────────────────────────────────────────────────────────────┐
  3. │jzclswnd.c                                     │
  4. │Restore the previous window contents, thereby closing the window, and         │
  5. │free up the memory, that the window was taking up.                 │
  6. │Returns Null if the specified window number was not found             │
  7. │                                         │
  8. │ (C) JazSoft Software by Jack A. Zucker (301) 794-5950              │
  9. └────────────────────────────────────────────────────────────────────────────┘
  10. */
  11.  
  12. #include <jaz.h>
  13. #include <jzscreen.h>
  14. jzclswnd(fnum)
  15. int fnum;
  16. {
  17.   TWINDOW *wptr;
  18.  
  19.   if ( !(wptr = wsearch(fnum))) return(0);
  20.  
  21.   jzrstwnd(wptr);        /* restore previous window contents */
  22.  
  23.   free ((int *) wptr->buf);    /* free up buffer memory */
  24.  
  25.   jzloccur(wptr->row,wptr->col);
  26.   return(1);            /* indicate success */
  27. }
  28.  
  29.